The examples in this directory are built alongside the rest of GTK.
-The examples under the `application[1-10]` directories are also included in
+The examples under the `application[1-9]` directories are also included in
the GTK API reference documentation, and can be built independently, using
the system libraries, by doing:
$ cd application1
$ make -f Makefile.example
+
+== Running the examples ==
+
+The examples can be run uninstalled.
+
+The later demos are using GSettings,so they need a GSettings schema.
+The code for these demos contains a workaround to look for the schema
+in the current directory, so this works:
+
+ $ cd application5
+ & ./exampleapp window.ui
all: exampleapp
-resources.c: exampleapp.gresource.xml window.ui app-menu.ui
+resources.c: exampleapp.gresource.xml window.ui
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
%.o: %.c
gschemas.compiled: org.gtk.exampleapp.gschema.valid
$(GLIB_COMPILE_SCHEMAS) .
-resources.c: exampleapp.gresource.xml window.ui app-menu.ui
+resources.c: exampleapp.gresource.xml window.ui
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
%.o: %.c
gschemas.compiled: org.gtk.exampleapp.gschema.valid
$(GLIB_COMPILE_SCHEMAS) .
-resources.c: exampleapp.gresource.xml window.ui app-menu.ui
+resources.c: exampleapp.gresource.xml window.ui
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
%.o: %.c
row = gtk_button_new_with_label (key);
g_signal_connect (row, "clicked",
G_CALLBACK (find_word), win);
- gtk_box_append (GTK_BOX (win->words), row);
+ gtk_list_box_insert (GTK_LIST_BOX (win->words), row, -1);
}
g_hash_table_unref (strings);
row = gtk_button_new_with_label (key);
g_signal_connect (row, "clicked",
G_CALLBACK (find_word), win);
- gtk_box_append (GTK_BOX (win->words), row);
+ gtk_list_box_insert (GTK_LIST_BOX (win->words), row, -1);
}
g_hash_table_unref (strings);